package com.fuhao.orderservice.service;

import com.fuhao.orderservice.failback.OrderClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * name:被调用方在注册中心服务的名称
 */
@FeignClient(name = "product-service",fallback = OrderClientFallback.class)
public interface OrderClient {

    @RequestMapping("/api/v1/product/findById")
    Map<String,Object> findById(@RequestParam("id") Integer id);
}
